package cn.wxManage.shop.service.impl;

import cn.common.common.model.ServerResponse;
import cn.wxManage.shop.dao.NoticeInfoMapper;
import cn.wxManage.shop.model.NoticeInfo;
import cn.wxManage.shop.service.INoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class NoticeService implements INoticeService {
    @Autowired
    NoticeInfoMapper noticeInfoMapper;
    @Override
    public ServerResponse<?> getNoticeList() {
        Map<String,List<NoticeInfo>> resultMap = new HashMap<String, List<NoticeInfo>>();
        resultMap.put("text",noticeInfoMapper.getNoticeList("text"));
        resultMap.put("image",noticeInfoMapper.getNoticeList("image"));
        return ServerResponse.createBySuccess(resultMap);
    }
}
